{if $bSimpleView && $bIsOwner}
    <div style="text-align:right;padding-bottom:4px;">
        <a class="link_action" href="{url link='public.account.favorites'}">[ {language text="edit_favorites"} ]</a>
    </div>
{/if}
<table width="100%" cellpadding="4" cellspacing="0">
<tr>
	<td class="border2">
		<table style="width: 100%;" class="mainmenu5" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
				<td class="block_header">{language text="favorite_people"}</td>
			</tr>
		</table>

{messages block='Favorites'}
{if 'added' == $sPerformed}
    {if $bSuccess}
    <div style="font-size:9pt;padding:20px;" class="color">
    <table cellpadding="10">
    <tr>
        <td>

        <a href="{url link='public.user' name=$aTargAcc.user}">
            {Account::Avatar sUser=$aTargAcc.user iSize=75 class="pic1" onmouseover="showInfo5('`$aTargAcc.user`', '', '');this.className='pic2';" onmouseout="this.className='pic1';return nd();"}
        </a>

        </td><td class="color">
        <a class="link_description" href="{url link='public.user' name=$aTargAcc.user}">{str_replace text="`you_have_just_added_atarg`" aTargAcc_user="`$aTargAcc.user`" }</a>

            <div class="list"><a class="link_action" href="{url link='public.account.favorites'}">[ {language text="view_list"} ]</a></div>
            <div class="list">{language text="back_to"} <a class="link_description" href="{url link='public.user' name=$aTargAcc.user}">{$aTargAcc.user}</a></div>
         {language text="profile"}

        </td></tr></table>
        </div>
    {else}
        <div style="padding:20px;" class="color">
          <a class="link_description" href="{url link='public.user' name=$aTargAcc.user}">{str_replace text="`sorry_you_already_have_at`" aTargAcc_user="`$aTargAcc.user`" }</a>
        <br /><br />
        </div>
    {/if}
{elseif 'deleted' == $sPerformed}
    {if $bSuccess}
        <div style="font-size:9pt;padding:20px;" class="color">
        <table cellpadding="10">
        <tr>
        <td>

        <a href="{url link='public.user' name=$aTargAcc.user}">
        {Account::Avatar sUser=$aTargAcc.user iSize=75 class="pic1" onmouseover="showInfo5('`$aTargAcc.user`', '', '');this.className='pic2';" onmouseout="this.className='pic1';return nd();"}
        </a>

        </td><td class="color">
            <a class="link_description" href="{url link='public.user' name=$aTargAcc.user}">{str_replace text="`you_have_just_deleted_ata`" aTargAcc_user="`$aTargAcc.user`"}</a>
        	<ul>

        	<li><a class="link_action" href="{url link='public.account.favorites'}">[ {language text="back_to_list_467"} ]</a></li>
        	</ul>
        </td></tr>
        </table>

        </div>
    {else}
        <div style="font-size:9pt;padding:20px;" class="color">
        {language text="no_such_member"}
        <br /><br />
        </div>
    {/if}
{elseif $aFavorites}

{language text="global_pager" fromRow=$aPaging.fromRow toRow=$aPaging.toRow totalRows=$aPaging.totalRows }

{include file="$sRootPath/_blocks/pager.html"}
<table style="width:100%;" cellpadding="5" cellspacing="0">
    <tr class="border13">
    {foreach from=$aFavorites item=aFavorite name=favorites}
        <td style="text-align:center;vertical-align:middle;">
        <table style="margin-left:auto;margin-right:auto;">
            <tr>
                <td style="font-size:8pt;" class="color">
                    <div><b><a class="link_description" href="{url link='public.user' name=$aFavorite.user}"> {$aFavorite.user}</a> </b></div>

                    <a href="{url link='public.user' name=$aFavorite.user}">
                        {Account::Avatar sUser=$aFavorite.user iSize=75 class="pic1" onmouseover="this.className='pic2';" onmouseout="this.className='pic1';return nd();"}
                    </a>
                    {if $bIsOwner}
                    <div>                    
                    <a class="link_description" href="{url link='public.account.favorites' userdelete=$aFavorite.id}" onclick="return sure();">
                    {language text='delete'}
                    </a>
                    </div>
                    {/if}
                </td>
            </tr>
        </table>
        </td>
        {if $smarty.foreach.favorites.iteration % $iRowSize == 0}
        </tr>
        <tr class="{if ($smarty.foreach.favorites.iteration/$iRowSize)%2 == 0}border13{/if}">
        {/if}
    {/foreach}
    {if $smarty.foreach.favorites.total % $iRowSize != 0}
        <td colspan="{$iRowSize}">&nbsp;</td>
    {/if}
    </tr>
</table>
{include file="$sRootPath/_blocks/pager.html"}

{else}
    <div class="message_info">{language text="there_are_no_favorite_peo"}</div>
{/if}
        </td>
	</tr>
</table>